home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / x11 / rpg / crossfir.92 / crossfir / crossfire-0.92.5 / crossedit / Edit.h < prev    next >
C/C++ Source or Header  |  1996-07-24  |  2KB  |  77 lines

  1. #ifndef _Edit_h
  2. #define _Edit_h
  3.  
  4. #include "Defines.h"
  5. #include "Cnv.h"
  6.  
  7. typedef enum _EditReturn {
  8.     EditOk = 1, EditError
  9. }   EditReturn;
  10.  
  11.  
  12. typedef enum _EditType {
  13.     Regular = 1, Pick, Wall, ClipBoard
  14. }   EditType;
  15.  
  16. struct _Edit{
  17.     struct _Edit *next;   /* in list of editors */
  18.     App app;              /* in this application context */
  19.     Attr mapattr;         /* map attributes */
  20.     Widget w;          /* mapEditor widget */
  21.     Widget view;      /* viewport of mapEditor */
  22.     Widget shell;      /* shell widget of map */
  23.     Map emap;             /* map-struct itself */
  24.     unsigned int modified:1;       /* map has bee touched */
  25.     unsigned int read_only:1;      /* cannot modify */
  26.     unsigned int overwrite:1;      /* deletes object under insertion */
  27.     unsigned int auto_choose:1;    /* select object to inserted */
  28.     struct {
  29. #if 0
  30.     Widget path;
  31.     Widget size;
  32.     Widget start;
  33. #endif
  34.     Widget refresh;
  35.     Widget read_only;
  36.     Widget show_weak_walls;
  37.     Widget overwrite;
  38.     Widget auto_choose;
  39.     Widget stacking;
  40.     }   iw;
  41.     EditType type;
  42. };
  43.  
  44. extern const XRectangle EditRectAll;
  45.  
  46. /*
  47.  * macros
  48.  */
  49. #define EditGetPath(self) (self->emap ? self->emap->path : NULL)
  50. #define EditGetMap(self) (self->emap)
  51. #define EditIsModified(self) (self->modified)
  52.  
  53. /*
  54.  * members
  55.  */
  56. extern void EditResizeScroll ( Edit self, int width, int height, int dx, int dy );
  57. extern Edit EditCreate ( App app, EditType type, String path );
  58. extern void EditDestroy ( Edit self );
  59. extern void EditUpdate ( Edit self );
  60. extern EditReturn EditSave ( Edit self );
  61. extern void EditPerformFill ( Edit self, int x, int y );
  62. extern void EditFillRectangle ( Edit self, XRectangle rec );
  63. extern void EditWipeRectangle ( Edit self, XRectangle rec );
  64. extern void EditShaveRectangle ( Edit self, XRectangle rec );
  65. extern void EditCopyRectangle ( Edit self, Edit src, XRectangle rect, int sx, int sy );
  66. extern void EditDeletePoint ( Edit self, int x, int y );
  67. extern void EditModified ( Edit self );
  68. extern void EditUnmodified ( Edit self );
  69. extern Boolean EditDelete ( Edit self, int x, int y, int z );
  70. extern Boolean EditInsert ( Edit self, int x, int y, int z );
  71. extern Boolean EditObjectInsert ( Edit self, object *obj, int x, int y, int z );
  72. extern void EditSetPath ( Edit self, String path );
  73.  
  74. #endif /* _Edit_h */
  75.  
  76.  
  77.